
 
package empresa.controller;

import empresa.model.Empresa;
import controller.*;
import java.sql.ResultSet;
import java.util.Vector;


public class EmpresaMgr extends DbManager{

        public static final EmpresaMgr mgr = new EmpresaMgr();

    private EmpresaMgr() {
        super( "Empresa" );
        m_titles = new String[]{"", "", "", "", ""};
    }
    @Override
    protected Empresa getBean() {
        return new Empresa();
    }

    @Override
    @SuppressWarnings("unchecked")
    protected void addObject( Vector v, ResultSet rs ) {
        v.add( new Empresa( rs ) );
    }

    @Override
    public synchronized Empresa getItem( String id ) {
        return (Empresa)super.getItem(id);
    }

    public synchronized Vector<Empresa> getList() {
        return executeQuery( "select * from Empresa" );
    }


}
